//frontend/src/router/apiRoutes.js
import Vue from 'vue';
import VueRouter from 'vue-router';
import { routes } from './routes';  // 使用命名导入
import { requireAuthGuard } from './guards';

Vue.use(VueRouter);

const router = new VueRouter({
    mode: 'history',
    routes,
});

// 使用路由守卫
router.beforeEach(requireAuthGuard);

export default router;
